<!DOCTYPE html>
<html>

<head>
    {include file="/Public/header"}
  <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>

    .border_S{
        border-bottom:1px solid #ccc;
    }
    .row{margin:0;}
        .col-md-4>.labelTxt,
        .col-md-8>.labelTxt,
        .col-md-12>.labelTxt {
            width: 150px;
            margin-bottom: 0;
            display: inline-block;
            line-height: 30px;
            border-right: 1px solid #ccc;
            text-align: center;
            padding-right: 10px;
            color:#333;
        }
        
        .col-md-8 {
            border-left: 1px solid #ccc;
            color:#333;
        }
        
        .col-md-4:nth-of-type(2) {
            border: 1px solid #ccc;
            border-top: none;
            border-bottom: none;
        }
        /*.col-md-4{padding-left:0;}*/
        
        .col-md-1,
        .col-md-2 {
            background: #fff;
            text-align: center;
            line-height: 30px;
            border-right: 1px solid #ccc;
            color:#333;
        }
        
        .col-md-6>.labelTxt,
        .col-md-3>.labelTxt {
            width: 120px;
            margin-bottom: 0;
            display: inline-block;
            line-height: 30px;
            border-right: 1px solid #ccc;
            text-align: left;
            padding-right: 10px;
            margin-left: 32px
        }
        
        .col-md-6,
        .col-md-3 {
            background: #fff;
            text-align: left;
            line-height: 30px;
            border-right: 1px solid #ccc;
            color:#333;
        }
        
        .float_A,
        .title_float_A {
            float: right;
            margin-right: 10px;
            margin-top: 7px;
            font-size: 14px;
            padding: 2px 9px;
        }
        
        .overFlow {
            overflow: hidden;
        }
        
        #tab_title {
            padding: 20px 12px 0
        }
        
        #tab_title span {
            display: inline-block;
            padding: 6px 6px;
            margin-left: 6px;
            background: #c8e0e8;
            border-top-right-radius: 6px;
            border-top-left-radius: 6px;
            color: #3b5573;
            cursor: pointer;
        }
        
        #tab_title .tabSpanActive {
            color: red
        }
        
        #tab_title span:nth-of-type(1) {
            margin-left: 10px;
        }
        
        .alert_addNewZone {
            display: block;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255, 255, 255, 0.7);
            color: #333
        }
        
        .alert_addNewZone .alert_addNewZone_content {
            background: #f4f4f5;
            position: fixed;
            top: 50%;
            left: 50%;
            width: 800px;
            height: 550px;
            margin: -225px 0 0 -400px;
            padding: 5px;
            border: 4px solid #ccc/* margin 负值为宽高的一半 */
        }
        
        h3 {
            font-weight: normal;
            text-align: left;
            line-height: 24px;
            font-size: 20px;
            padding-left: 1%;
            width: 99%;
            background: #a8c8e8
        }
    .nav-tabs>li>a{padding: 5px 15px}
        /*.text_over{display: inline-block;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}*/
    </style>

</head>

<body class="white-bg">
   <div  class="container" style="padding: 0;width: 100%">
     <div class="page-heade">
       <h2 class="title_color text-center">经销商基本信息</h2>
    </div>
    <div class="row white-bg border_S" style="min-height: 30px;font-size:12px">
        <div class="col-md-4">
            <label for="" class="labelTxt">销售分区</label>
            <span>{$data.zoning}</span>
        </div>
        <div class="col-md-4">
            <label for="" class="labelTxt">销售省份</label>
            <span>{$data.provice}</span>
        </div>
        <div class="col-md-4">
            <label for="" class="labelTxt">销售城市</label>
            <span>{$data.city}</span>
        </div>
    </div>
    <div class="row white-bg border_S" style="min-height: 30px;font-size:12px">
        <div class="col-md-12">
            <label for="" class="labelTxt">详细地址</label>
            <span id="detailAddress">{$data.addr}</span>
            <i></i>
            <input type="button" class="btn btn-primary" value="重新在地图上标注" id="biaozhumap">
        </div>
    </div>
    <div class="row white-bg border_S" style="min-height: 30px;font-size:12px ;line-height: 30px">
        <div class="col-md-4">
            <label for="" class="labelTxt">经销商编号</label>
            <span>{$data.sn}</span>
        </div>
        <div class="col-md-4">
            <label for="" class="labelTxt">经销商名称</label>
            <span>{$data.title}</span>
        </div>
        <div class="col-md-4">
            <label for="" class="labelTxt">经销商目标费用率</label>
            <span>{$data.costrate}%</span>
        </div>
    </div>
    <div class="row white-bg border_S" style="min-height: 30px;font-size:12px">
        <div class="col-md-4">
            <label for="" class="labelTxt">是否为直营</label>
            <span>{if $data.direct==0}是{else}否{/if}</span>
        </div>
        <div class="col-md-4">
            <label for="" class="labelTxt">经销商等级</label>
            <span>
                {if $data.types == 1}其他
                {elseif $data.types == 2}核心经销商
                {elseif $data.types == 3}二级经销商
                {elseif $data.types == 4}一级经销商
                {/if}
            </span>
        </div>
        <div class="col-md-4">
            <label for="" class="labelTxt">开始合作时间</label>
            <span>{$data.cooptime}</span>
        </div>
    </div>
    <div class="row white-bg" style="min-height:30px;font-size:12px;">
        <div class="col-md-12 border_S">
            <label for="" class="labelTxt">发票类型</label>
            <span>{if $data.invoicetype==0}增值发票{else}普通发票{/if}</span>
        </div>
        <div class="col-md-12 border_S">
            <div class="col-md-4" style="padding-left: 0">
                <label for="" class="labelTxt">渠道类型</label>
                <span>{$data.channeltype}</span>
            </div>
            <div class="col-md-8 overFlow">
                <label for="" class="labelTxt">旗下系统数量</label>
                <span>{$data.systems_num}</span>
                <a href="javascript:;" class="showSystem">显示旗下系统</a>
                <a href="#" class="float_A btn btn-warning" id="amendAgencyBasicInfo">修改</a>
            </div>
        </div>
        <div class="col-md-12 white-bg border_S showSystemCont" style="display: none;">
            <div class="col-md-3 border_S" style="line-height: 80px;text-align: center;">
                旗下系统
            </div>
            <div class="col-md-9 border_S">
                {volist name="data.systems" id="row"}
                <div class="col-md-12" style="line-height: 30px"><span>{$row.title}</span></div>
                {/volist}
            </div>
            <div class="col-md-12 hideSystem" style="line-height: 30px;text-align: center; cursor: pointer;">关闭旗下系统显示</div>
        </div>
    </div>
    <!-- tab切换 -->
    <div class="row  border-bottom" id="tab_title">
        <ul class="nav nav-tabs gray-bg" id="side-menu">
            <li role="presentation" class="active J_menuItem"><a href="{:url('tab',array('key'=>'contactMan','id'=>$data.id))}" target="iframe0">联系人</a></li>
            <!--<li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'delivery_address','id'=>$data.id))}" target="iframe0">收货地址</a></li>-->
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'fuzeMan','id'=>$data.id))}" target="iframe0">负责人</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'yinglifenxi','id'=>$data.id))}" target="iframe0">盈利分析</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'marketChance','id'=>$data.id))}" target="iframe0">销售机会</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'contactRecord','id'=>$data.id))}" target="iframe0">交往记录</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'commission_items','id'=>$data.id))}" target="iframe0">待办事项</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'quoteRecord','id'=>$data.id))}" target="iframe0">报价记录</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'costRecord','id'=>$data.id))}" target="iframe0">费用记录</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'compact','id'=>$data.id))}" target="iframe0">合同</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'despatch','id'=>$data.id))}" target="iframe0">发运</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'bill','id'=>$data.id))}" target="iframe0">发票</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'inventory_records','id'=>$data.id))}" target="iframe0">库存记录</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'sales_forecast','id'=>$data.id))}" target="iframe0">销量预测</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'document','id'=>$data.id))}" target="iframe0">文档</a></li>
            <!--<li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'image','id'=>$data.id))}" target="iframe0">图片</a></li>-->
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'evaluate','id'=>$data.id))}" target="iframe0">评价</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'daily_record'))}" target="iframe0">日志</a></li>
            <li role="presentation" class="J_menuItem"><a href="{:url('tab',array('key'=>'order','id'=>$data.id))}" target="iframe0">订单</a></li>
        </ul>
    </div>
    <div class="row" id="contentH" style="padding: 7px;height: 600px">
        <iframe name="iframe0" id="iframe1" width="100%" height="100%" src="{:url('tab',array('key'=>'contactMan','id'=>$data.id))}" frameborder="0" data-id="{:url('tab',array('key'=>'contactMan'))}" seamless></iframe>
    </div>

   </div>
    <!-- 修改经销商弹出框基本信息-->

    <!-- 全局js -->
   {include file="Public/footer"}
    <script src="__STATIC__/layout/js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>

    <!-- 自定义js -->
    <!-- <script src="js/content.js?v=1.0.0"></script> -->
    <!-- 自定义js -->
    <!-- <script src="js/hplus.js?v=4.1.0"></script> -->

    <!-- 第三方插件 -->
    <!-- <script src="js/plugins/pace/pace.min.js"></script> -->
    <script>
        $(document).ready(function() {
            /*tab烂切换*/
            $("#tab_title").on("click", "a", function() {
                $(this).parent("li").addClass("active").siblings().removeClass("active")
            })
            $("#amendAgencyBasicInfo").click(function() {
                layer.open({
                    type: 2,
                    title: '&nbsp;',
                    shadeClose: true,
                    shade: false,
                    maxmin: true, //开启最大化最小化按钮
                    area: ['80%', '500px'],
                    content: '{:url("amendAgencyInfo",array("id"=>$data.id))}'
                })
            });
            $(".hideSystem").click(function() {
                $(this).parent(".showSystemCont").hide()
            })

            //显示及隐藏旗下系统
            $(".showSystem").click(function() {
                var text = $(this).text()
                if(text == '显示旗下系统'){
                    $(this).text('隐藏旗下系统')
                    $('.showSystemCont').show()
                }else{
                    $(this).text('显示旗下系统')
                    $('.showSystemCont').hide()
                }
            })

            //在地图上重新标注
            $('#biaozhumap').click(function () {
                var index = layer.open({
                    type:2,
                    title:'在地图上重新标注',
                    area:['80%','80%'],
                    content:'{:url("map",array("id"=>$data.id))}'
                })
            })
        })
    </script>
    <script>
    $("#side-menu li a").click(function(){
        var src=$(this).attr("href");
        $(".J_iframe").attr("src",src);
        $(".J_iframe").attr("data-id",src);
    })
    </script>
    <script>
    </script>
</body>

</html>